package com.spark3;


import scala.collection.JavaConverters;
import scala.collection.Seq;

import java.util.ArrayList;
import java.util.List;

public class MainTest6 {

    public void add(int a,int ...b){
        System.out.println("可变参数方法 ===> ");
        for (int x : b){
            System.out.println(x);
        }

    }

    public void add(int a){
        System.out.println("单个参数方法");
    }

    public static void main(String[] args) {

        List<String> tmpList = new ArrayList<String>();
        tmpList.add("abc");
        tmpList.add("xxx");
        Seq<String> tmpSeq = JavaConverters.asScalaIteratorConverter(tmpList.iterator()).asScala().toSeq();
        Calculate calculate = new Calculate();
        calculate.add("y",tmpSeq);
    }
}
